package project1;

public class Fish extends  Animal{
    private double weight;
    public Fish(int age, double weight){
        super(age);
        this.weight = weight;
    }
    public double getWeight() {
        return weight;
    }
    public void setWeight(double weight) {
        this.weight = weight;
    }
    @Override
    public String info(){
        return "我是一只" + weight + "斤重的鱼！\n" + super.info();
    }
}
